]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overviewControls: synchronize viewSelector fade and controls slide
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 18 Feb 2013 05:17:56 +0000 (00:17 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 18 Feb 2013 05:30:04 +0000 (00:30 -0500)
If the animation time is not the same for these two, the translation
will be adjusted to the allocation during the tween, resulting in a jump
in the animation.

https://bugzilla.gnome.org/show_bug.cgi?id=694035

js/ui/overviewControls.js
js/ui/viewSelector.js

index 4800f4f6af59954a59de066602f5a9e0d7c841e3..f1e06873a9a6f8f974f9bc0a6112c2c53efd679e 100644 (file)
@@ -9,7 +9,7 @@ const Main = imports.ui.main;
 const Tweener = imports.ui.tweener;
 const ViewSelector = imports.ui.viewSelector;
 
-const SIDE_CONTROLS_ANIMATION_TIME = 0.2;
+const SIDE_CONTROLS_ANIMATION_TIME = 0.16;
 
 function getRtlSlideDirection(direction, actor) {
     let rtl = (actor.text_direction == Clutter.TextDirection.RTL);
index a32ee7f8c302fde47e4b8fce7d528b3715d3c3ea..48b3e3b70098d014420e0335f5ee9f56e226f0d2 100644 (file)
@@ -215,7 +215,7 @@ const ViewSelector = new Lang.Class({
         this._activePage.show();
         Tweener.addTween(this._activePage,
             { opacity: 255,
-              time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME / 2,
+              time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
               transition: 'easeOutQuad'
             });
     },
@@ -231,7 +231,7 @@ const ViewSelector = new Lang.Class({
         if (oldPage && !noFade)
             Tweener.addTween(oldPage,
                              { opacity: 0,
-                               time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME / 2,
+                               time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
                                transition: 'easeOutQuad',
                                onComplete: Lang.bind(this,
                                    function() {